import { createRouter, createWebHashHistory } from 'vue-router';
import Home from '../src/views/Home.vue';
import channel from '../src/views/diany.vue'; // 确保路径正确

// 定义路由规则
const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/channel',
    name: 'channel',
    component: channel
  }
];

// 创建路由实例
const router = createRouter({
  history: createWebHashHistory(), // 使用 hash 模式
  routes
});

export default router;